@include('Admin.public.head')
<body>
@include('Admin.public.menu')
<div class="admin-content" id="app">
    <div class="daohang">

    </div>
    @if(Auth::user()->is_branch ==0)
    <div class="admin">
        <div class="admin-index">
      <dl data-am-scrollspy="{animation: 'slide-right', delay: 100}" style="box-shadow: 10px 10px 11px #888888;">
        <dt class="qs"><i class="am-icon-users"></i></dt>
        <dd style="font-size: 33px;">@{{ memberNum }}</dd>
        <dd class="f12">全部会员</dd>
      </dl>
      <dl data-am-scrollspy="{animation: 'slide-right', delay: 600}" style="box-shadow: 10px 10px 11px #888888;">
        <dt class="hs"><i class="am-icon-shopping-cart"></i></dt>
        <dd style="font-size: 33px;">@{{ orderNum }}</dd>
        <dd class="f12">成交订单总数量</dd>
      </dl>
      <dl data-am-scrollspy="{animation: 'slide-right', delay: 900}" style="box-shadow: 10px 10px 11px #888888;">
        <dt class="ls"><i class="am-icon-cny"></i></dt>
        <dd style="font-size: 33px;">@{{ orderMoney }}</dd>
        <dd class="f12">成交订单总金额</dd>
      </dl>
	  <dl data-am-scrollspy="{animation: 'slide-right', delay: 1200}" style="box-shadow: 10px 10px 11px #888888;">
	    <dt class="cs"><i class="am-icon-area-chart"></i></dt>
	    <dd style="font-size: 33px;">@{{ RebateNum }}</dd>
	    <dd class="f12">全盘分润</dd>
	  </dl>
    </div>
	
	<div class="admin-index">
	  <dl data-am-scrollspy="{animation: 'slide-right', delay: 100}" style="box-shadow: 10px 10px 11px #888888;">
	    <dt class="qs"><i class="am-icon-user-plus"></i></dt>
	    <dd style="font-size: 33px;">@{{ memberSum }}</dd>
	    <dd class="f12">当日新增会员</dd>
	  </dl>
	  <dl data-am-scrollspy="{animation: 'slide-right', delay: 600}" style="box-shadow: 10px 10px 11px #888888;">
	    <dt class="hs" style="background-color: #9BCD9B"><i class="am-icon-cny"></i></dt>
	    <dd style="font-size: 33px;">@{{ rechargeNum }}</dd>
	    <dd class="f12">总充值金额</dd>
	  </dl>
	  <dl data-am-scrollspy="{animation: 'slide-right', delay: 900}" style="box-shadow: 10px 10px 11px #888888;">
	    <dt class="ls" style="background-color:rgb(180, 166, 180)"><i class="am-icon-line-chart"></i></dt>
	    <dd style="font-size: 33px;">@{{ dayRecharge }}</dd>
	    <dd class="f12">今日充值金额</dd>
	  </dl>
	</div>
	
	<div style="width: 100%;">
    <div class="admin-biaoge">
		<div class="shujuone" style="box-shadow: 10px 10px 11px #888888;width: 92%;margin-top: 6px;background-color: #1A73E8;">
		  <dl style="margin-top: 52px;">
		    <dt style="font-size: 22px;font-weight: 600;text-align: center;">昨日分润</dt>
		    <dt>昨日奖励积分：@{{credit2Sum}}</dt>
		    <dt>昨日复销积分：@{{credit5Sum}}</dt>
		  </dl>
		</div>
	  <div style="margin-top: 30px;text-align: center;" v-for="val in goodsSale">
	  <div style="width:30%;height: 260px;border-radius: 12px; border-top: #ff6633 6px solid;float: left;box-shadow: 10px 10px 11px #888888;padding: 10px;margin-left: 10px;">
		  <img style="width: 154px;height: 60%;border-radius: 11px;" :src="val.goods_thumb" alt="">
		  <p style="line-height: 20px;"><b>商品名称:</b>&nbsp;&nbsp;&nbsp;@{{val.goodsname}}</p>
		  <p style="line-height: 30px;margin-bottom: 0px;"><b>商品销量:</b>&nbsp;&nbsp;&nbsp;&nbsp;@{{val.sold}}</p>
	  </div> 
	  </div>
    </div>

    <div class="shuju">
      <div class="shujuone" style="box-shadow: 10px 10px 11px #888888;height: 210px;">
        <dl style="margin-top: 52px;">
          <dt>购物积分总和：@{{credit1Num}}</dt>
          <dt>奖金积分总和：@{{credit2Num}}</dt>
		  <dt>复销积分总和：@{{credit5Num}}</dt>
{{--		  <dt>冻结积分总和：@{{credit3Num}}</dt>--}}
        </dl>
      </div>
      <div class="shujutow" style="box-shadow: 10px 10px 11px #888888;height: 210px;">
        <dl style="margin-top: 52px;">
          <dt>今日订单:@{{dailyCount}}</dt>
          <dt>今日收入:@{{recordSum}}</dt>
        </dl>
      </div>
      <div class="slideTxtBox">
        <div class="hd">
          <ul>
            <li>提现申请(@{{ recorNum }})</li>
            {{--<li>提现列表</li>--}}
          </ul>
        </div>
        <div class="bd">
          <ul>
            <table width="100%" class="am-table">
              <tbody>
		      <tr>
				  <th>提现账号</th>
				  <th>开户名</th>
				  <th>开户账号</th>
				  <th>提现金额</th>
			  </tr>
                <tr v-for="val in recordData">
                  {{--<td width="7%"  align="center">姓名 </td>--}}
                  <td width="20%" >@{{ val.user_name }}</td>
                  <td width="20%" >@{{ val.account_name }}</td>

                  <td width="30%" >@{{ val.collection_number }}</td>

                  <td width="20%"><a href="#">金额@{{ val.money }}</a></td>
                </tr>
              </tbody>
            </table>
          </ul>
        </div>
      </div>
	  
	  
      @else
      <div class="admin">
         <h2>Welcome login baoli backstage manage system</h2>
      </div>
	

      @endif
      <script type="text/javascript">jQuery(".slideTxtBox").slide();</script>
    </div>
	</div>
	
<!-- 	<div style="position: fixed;bottom: 0;color: #BBB;font-size: 12px;left: 45%;">
			  <a style="display: inline;margin-right: 18px;" href="https://beian.miit.gov.cn/#/Integrated/index">渝ICP备2021004524号</a>
			  <a style="display: inline;" href="https://mp.weixin.qq.com/s/F7c9QI7T_xRCtcKUY9XueA">关于我们</a>
	</div> -->
      <script>
          var app = new Vue({
              el:"#app",
              data: {
                  memberNum :'',//转账列表
                  orderNum:'',//订单数量
                  moneryNum:'',//奖励币总和
                  recorNum:'',//待处理提现
                  recordSum:'',//今日收入
                  recordData:{},//提现
				  orderMoney :'',//成交订单总数量
				  credit1Num:'',//积分总和
				  credit2Num:'',//奖励积分总和
                  credit3Num:'',//奖励积分总和
				  credit5Num:'',
				  dailyCount:'',
				  RebateNum:'' ,//全盘分润
				  goodsSale:{},//
				  shareSum:'',
				  memberSum:'',//新增会员
				  rechargeNum:'',//充值总金额
				  dayRecharge:'',//今日充值
				  credit2Sum:'',//当日参与积分
				  credit5Sum:''//当日分享积分
              },
              //事件
              methods: {
                  initialize:function () {
                      //首页数据
                      $.get("/admin/doIndex",{'_token':'{{csrf_token()}}'},function (res) {
                          if(res.code){
                              app.memberNum = res.memberNum;
                              app.orderNum = res.orderNum;
                              app.moneryNum = res.moneryNum;
                              app.recorNum = res.recorNum;
                              app.recordSum = res.recordSum;
							  app.shareSum = res.shareSum;
                              app.recordData = res.recordData;
							  app.orderMoney  = res.orderMoney;
							  app.credit1Num=res.credit1Num;//积分总和
							  app.credit2Num=res.credit2Num;//奖励积分总和
							  app.credit3Num=res.credit3Num;//奖励积分总和
							  app.credit5Num=res.credit5Num;
							  app.dailyCount = res.dailyCount;//今日订单
							  app.RebateNum = res.RebateNum; //全盘分润
							  app.goodsSale = res.goodsSale;
							  app.memberSum = res.memberSum;
							  app.rechargeNum = res.rechargeNum;
							  app.dayRecharge = res.dayRecharge;
							  app.credit2Sum = res.credit2Sum;
							  app.credit5Sum = res.credit5Sum;
                          } else {
                              layer.msg(res.data);
                          }
                      });
                  },

              },
              //自动执行
              mounted: function () {
                  this.initialize();
              },
          })
      </script>
@include('Admin.public.foot')